package xiangya.bysj.mapper.interf;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import xiangya.bysj.entity.Cent;
import xiangya.bysj.entity.RankDoctor;


public interface CentMapper extends MapperInterface<Cent> {
	/**
	 * 
	 * @param doctorCode 医师id
	 * @return	提供给用户咨询服务所获积分 
	 */
	public double selectForAnswer(String doctorCode);
	
	/**
	 * 修改积分
	 */
	public void updateCent(@Param("forWhat")String forWhat,@Param("doctorCode")String doctorCode,@Param("cent")double cent);
	
	/**
	 * 注册时插入医生记录
	 */
	public void registerCent(@Param("doctorCode")String doctorCode);
	
	/**查询排行榜前十名
	 * @param id
	 * @return
	 */
	public List<RankDoctor> selectRank10Top();
	
	/**
	 * 根据doctorid查询该排名、分数
	 * @param id
	 * @return
	 */
	public RankDoctor selectRankByDoctorId(int id);
	
}
